<template>
  <div class="adminmodule mb-20">
    <div class="adminmodule-c">
      <div class="adminmodule-c-tab">
        <span class="active">待处理论坛文章审核（{{dataTotal}}）</span>
        <!--<span>超时书籍（10）</span>-->
      </div>
      <div class="adminmodule-c-body">
        <div class="adminmodule-c-body-title">
          <span class="adminmodule-c-t-forum">文章标题</span>
          <span class="adminmodule-c-t-forum">版块</span>
          <span class="adminmodule-c-t-forum">发布人</span>
          <span class="adminmodule-c-t-forum">提交时间</span>
        </div>
        <div class="adminmodule-c-body-list" v-for="(item,index) in arryList" v-if="index<5" @click="applyBook" :key="index">
          <span class="adminmodule-c-l-forum">{{item.title}}</span>
          <span class="adminmodule-c-l-forum">{{item.plate.name}}</span>
          <span class="adminmodule-c-l-forum">{{item.user.realname}}</span>
          <span class="adminmodule-c-l-forum">{{item.user.create_time}}</span>
        </div>
        <div class="adminmodule-c-body-more"><span @click="applyBook">查看更多<i class="el-icon-d-arrow-right"></i></span></div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: ['statisticsData'],
    name: 'powerBook',
    data () {
      return {
        editForm: {
          book_name: '', // 	字符串 	必填 	1 	- 	名称
          code: '', // 	字符串 	必填 	1 	- 	条码
          user_name: '', // 	字符串 	必填 	1 	- 	借阅人
          status: 0, // 	字符串 	必填 	1 	- 	状态0申请中1待归还2已归还
          p: 1 //
        }, // 编辑界面数据
        arryList: [], // 数据列表
        dataTotal: 0
      }
    },
    created () {
      this.InitFn()
    },
    methods: {
      // 初始化
      InitFn () {
        let data = {
          is_examine: 0, plate_id: '', title: '', p: 1
        }
        this.$fetch(this.api.forum_postings_index, data).then((response) => {
          if (response.code === 0) {
            for (let i in response.list.data) {
              response.list.data[i].create_time = response.list.data[i].create_time.split(' ')[0]
            }
            this.arryList = response.list.data
            this.dataTotal = response.list.total
          } else {
          }
        }).catch((err) => {
          console.log(err)
        })
      },
      pathIndexFn () {
        this.$router.push('/forumexamine')
      },
      applyBook () {
        this.$router.push('/forumexamine')
      }
    }
  }
</script>

<style scoped>

</style>
